import range from './range.js'; 
import take from './take.js'; 
import toArray from './toArray.js'; 

const nextNumber = range();
console.log(nextNumber()); //0
console.log(nextNumber()); //1
console.log(nextNumber()); //2

console.log(toArray(take(5)(nextNumber))); //2